//
//  TroopAction.hpp
//  fingeradvanture
//
//  Created by shuaibincheng on 16/5/21.
//
//

#ifndef TroopAction_hpp
#define TroopAction_hpp
#include "cocos2d.h"

USING_NS_CC;
class TroopForm;

enum TroopActionStyle{
    TYPE_TRANSLATIONASGROUP,
    TYPE_ODDMOVEEVENSTILL,
    TYPE_CROSSFORM,
    TYPE_CIRCLEFORM
};

class TroopAction
{
protected:
    int numOfMonster; //队伍中怪物的个数
    TroopForm *form; //包含对队伍队形的引用，TroopAction对象在TroopForm之前被释放，不需要维护form的生命周期
public:
    TroopAction(int num);
    
    inline void setForm(TroopForm *form){ this->form = form; }
    virtual void train(const Vector<Node *> &monsters);   //训练队伍，即给每个monster加上动作
public:
    static TroopAction *getActionByType(TroopActionStyle type, int numOfMonsters);
};

#endif /* TroopAction_hpp */
